Title: Getting a Yubikey to Work for u2f and as a GPG Smartcard on Void Linux
Date: 2019-07-25 13:00
Category: yubikey
Tags: gpg, yubikey, linux, u2f, CLI, void


###Distribution Testing
Recently I have been trying a few more linux distributions as I have been on debian sid for a while, but have grown tired of old packages... even on sid.

Since some people I know had been singing [Void Linux] praises, I figured I might as well try it...
Especially given how often systemd annoys me.


###The SNAFU
tl;dr a yubikey doesn't work 'out of the box' on void.

Browsers such as chromium could not do u2f, and gpg only saw the smartcard as root.


###Fixing Things™
I do not claim that this write up is the best way to accomplish setting up a yubikey to work for fido u2f and as a gpg smartcard on void linux.
There may be better ways out there.
There may be a *Right Way* out there.
But I sure as hell couldn't find a concisely documented way out there...
At least not one that had all the information in one place, seemed current, and verified that void linux would like the solution.


####Citations
Credit where it is due, the arch wiki had a good clear part <sup>[arch wiki reference]</sup> on getting a yubikey to have uf2 working with browsers such as chromium, and a link to the udev rule <sup>[70-u2f.rules]</sup> provided by yubico.
Yubico also already had udev rules <sup>[69-yubikey.rules], [70-yubikey.rules]</sup> already written up for getting the gpg smartcard to work for non root accounts.


####Solution
So, to get things working we place [70-u2f.rules], [69-yubikey.rules], and [70-yubikey.rules] in `/etc/udev/rules.d/`, and you could give the system a reboot for good measure. <sup>(I dont think the reboot was even needed)</sup>


###Afterword
So what is the point of this short blog post?
To remind me how to set this up if I ever need to do so again, and hopefully to bump the answer higher in your search results so you don't spend as much time on this as I had to.


###Links
[Void Linux]  
[arch wiki reference]  
[70-u2f.rules]  
[69-yubikey.rules]  
[70-yubikey.rules]  


[Void Linux]: https://voidlinux.org/
[arch wiki reference]: https://wiki.archlinux.org/index.php/Chromium/Tips_and_tricks#U2F_authentication
[70-u2f.rules]: https://github.com/Yubico/libu2f-host/blob/master/70-u2f.rules
[69-yubikey.rules]: https://github.com/Yubico/yubikey-personalization/blob/master/69-yubikey.rules
[70-yubikey.rules]: https://github.com/Yubico/yubikey-personalization/blob/master/70-yubikey.rules
